package xinxin.com.ChainofResponsibilityPattern;

import xinxin.com.ChainofResponsibilityPattern.Manager.CommonManager;
import xinxin.com.ChainofResponsibilityPattern.Manager.GeneralManager;
import xinxin.com.ChainofResponsibilityPattern.Manager.Majordomo;
import xinxin.com.ChainofResponsibilityPattern.Manager.Manager;
import xinxin.com.ChainofResponsibilityPattern.Request.Request;

/**
 * @author ：史鑫鑫
 * @date ：Created in 2019/4/1 19:49
 */
public class ChainofResponsibilityPattern {
    public static void main(String[] args) {
        CommonManager jinli = new CommonManager("金利");
        Majordomo zongjian = new Majordomo("宗剑");
        GeneralManager zhongjingli = new GeneralManager("钟精励");

        jinli.setSuperior(zongjian);
        zongjian.setSuperior(zhongjingli);

        Request request = new Request();
        request.setRequestType("加薪");
        request.setRequestContent("小菜请求加薪");
        request.setNumber(100);

        jinli.RequestApplicatuions(request);
    }
}
